﻿namespace Microsoft.Services.TestTools.UITesting.Html
{
    using System;

    /// <summary>
    /// Web UI Test Configuration
    /// </summary>
    /// <remarks>
    /// Export a type in your test project that inherits 
    /// IWebUITestConfiguration in order to provide a 
    /// base address for your <see cref="Page"/> objects.
    /// </remarks>
    /// <example>
    /// <code>
    /// [Export(typeof(IWebUITestConfiguration))]
    /// public class TestConfiguration : IWebUITestConfiguration {
    ///    public Uri GetBaseUri(string name) {
    ///       if (name == "Intra") {
    ///          return new Uri("http://intranet.contoso.local");
    ///        }
    ///        return new Uri("http://www.contoso.local");
    ///    }
    /// }
    /// </code>
    /// </example>
    /// <seealso cref="BaseUriAttribute"/>
    public interface IWebUITestConfiguration
    {

        /// <summary>
        /// Gets the base Uri
        /// </summary>
        /// <param name="name">
        /// The name of the Uri.
        /// </param>
        /// <returns>
        /// The base Uri
        /// </returns>
        Uri GetBaseUri(string name);
        /// <summary>
        /// Gets the application exe path
        /// </summary>
        /// <param name="application">
        /// The name of the page to open.
        /// </param>
        /// <returns>
        /// The application exe path
        /// </returns>
        string GetApplicationPath(string application);

    }
}